﻿Imports System.IO

Public Class frmItemList
    Public FilterStr As String = ""
    Public IsMultiSelect As Boolean = False

    Private Sub frmReminder_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        If IsMultiSelect Then
            GridDetail.RootTable.Columns("Chk").Visible = True
        Else
            GridDetail.RootTable.Columns("Chk").Visible = False
        End If
        Me.Cursor = Cursors.WaitCursor
        Dim fn As New Functions
        Dim str As String
        Dim dt As DataTable

        str = "Select ItmsGrpNam ItemGroup,ItemCode,ItemName,AvgPrice,LastPurPrc from OITM T0 join OITB T1 on T0.itmsgrpcod=T1.itmsgrpcod"
        If FilterStr <> "" Then
            str = str + " where " + FilterStr
        End If
        dt = fn.DoQueryReturnDT(str)
        GridDetail.DataSource = dt
        Me.Cursor = Cursors.Default
    End Sub


    Private Sub GridDetail_RowDoubleClick(ByVal sender As System.Object, ByVal e As Janus.Windows.GridEX.RowActionEventArgs) Handles GridDetail.RowDoubleClick
        Me.DialogResult = Windows.Forms.DialogResult.OK
    End Sub


End Class
